<?php


namespace app\controllers;


use app\entity\ActTypeEntity;
use app\models\request\ReqActListPage;
use app\service\ActService;

class GameListController extends BaseJsonController
{

    /**
     * @param $req ReqActListPage
     * @param $userInfo
     * @return \app\models\response\RespLogin|mixed
     * @throws \app\exception\OaException
     */
    public function doService($req,$userInfo)
    {
        $service = new ActService();
        $actEntity = $service->getGameList();

        $arr = [];
        foreach ($actEntity as $r) {



            $arr[] = [
                "id"=>$r->getId(),
                "name"=>$r->getGameName(),
            ];
        }

        return $arr;


    }




    public function needLogin(){
        return false;
    }
}